<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">

<head>
    <meta charset="UTF-8">
    <title>修改密码</title>
</head>

<body>
    <div th:fragment="changePassword">
        <div class="change-password-container">
            <form id="changePasswordForm" class="change-password-form" th:action="@{/change-password}" method="post">
                <div th:if="${error}" class="error-message" th:text="${error}"></div>
                <div th:if="${message}" class="success-message" th:text="${message}"></div>
                
                <div class="form-group">
                    <label for="oldPassword">原&emsp;密&emsp;码：</label>
                    <input type="password" id="oldPassword" name="oldPassword" required>
                </div>
                
                <div class="form-group">
                    <label for="newPassword">新&emsp;密&emsp;码：</label>
                    <input type="password" id="newPassword" name="newPassword" required>
                    <div class="password-hint" id="passwordHint" style="display: none;">密码长度至少6位</div>
                </div>
                
                <div class="form-group">
                    <label for="confirmNewPassword">确认新密码：</label>
                    <input type="password" id="confirmNewPassword" name="confirmNewPassword" required>
                </div>
                
                <div class="form-actions">
                    <button type="submit" class="btn btn-primary">修改密码</button>
                </div>
            </form>
        </div>
    </div>
</body>

</html>